Optimal. Leaf size=204 \[ \frac {2 (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{c^2 f g (m-n) (m-n+2) (m-n+4)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} (g \cos (e+f x))^{-m-n}}{f g (m-n+4)}+\frac {2 (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{c f g (m-n+2) (m-n+4)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.67, antiderivative size = 204, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.044, Rules used = {2849, 2848} \[ \frac {2 (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{c^2 f g (m-n) (m-n+2) (m-n+4)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} (g \cos (e+f x))^{-m-n}}{f g (m-n+4)}+\frac {2 (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{c f g (m-n+2) (m-n+4)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2848
Rule 2849
Rubi steps
\begin {align*} \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2+n} \, dx &=\frac {(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2+n}}{f g (4+m-n)}+\frac {2 \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n} \, dx}{c (4+m-n)}\\ &=\frac {(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2+n}}{f g (4+m-n)}+\frac {2 (g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{c f g (2+m-n) (4+m-n)}+\frac {2 \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx}{c^2 (2+m-n) (4+m-n)}\\ &=\frac {(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2+n}}{f g (4+m-n)}+\frac {2 (g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{c f g (2+m-n) (4+m-n)}+\frac {2 (g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{c^2 f g (m-n) (2+m-n) (4+m-n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 32.56, size = 183, normalized size = 0.90 \[ \frac {2^{n-2} \cos (e+f x) \sin ^{2 n-4}\left (\frac {1}{2} \left (-e-f x+\frac {\pi }{2}\right )\right ) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^{-2 (n-2)} (g \cos (e+f x))^{-m-n-1} \left (-2 (m-n+2) \sin (e+f x)+\cos \left (2 \left (-e-f x+\frac {\pi }{2}\right )\right )+m^2-2 m n+4 m+n^2-4 n+3\right )}{f (m-n) (m-n+2) (m-n+4)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.50, size = 183, normalized size = 0.90 \[ -\frac {{\left (2 \, \cos \left (f x + e\right )^{3} + 2 \, {\left (m - n + 2\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (m^{2} - 2 \, {\left (m + 2\right )} n + n^{2} + 4 \, m + 4\right )} \cos \left (f x + e\right )\right )} \left (g \cos \left (f x + e\right )\right )^{-m - n - 1} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} e^{\left (2 \, {\left (n - 2\right )} \log \left (g \cos \left (f x + e\right )\right ) - {\left (n - 2\right )} \log \left (a \sin \left (f x + e\right ) + a\right ) + {\left (n - 2\right )} \log \left (\frac {a c}{g^{2}}\right )\right )}}{f m^{3} - f n^{3} + 6 \, f m^{2} + 3 \, {\left (f m + 2 \, f\right )} n^{2} + 8 \, f m - {\left (3 \, f m^{2} + 12 \, f m + 8 \, f\right )} n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (g \cos \left (f x + e\right )\right )^{-m - n - 1} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n - 2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.84, size = 0, normalized size = 0.00 \[ \int \left (g \cos \left (f x +e \right )\right )^{-1-m -n} \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{-2+n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 15.65, size = 887, normalized size = 4.35 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________